The invention relates generally to digital imaging. More specifically, the invention relates to a method and apparatus for attenuating quantization contour artifacts in underquantized image data.
For any number of reasons, a digital image might be undersampled or underquantized. When rendered on a display or printer, an image having a tone scale that is insufficiently quantized is subject to the introduction of quantization contour artifacts. These artifacts can be especially objectionable in image areas having spatially smooth intensity variations such as sky, skin and large homogeneous surfaces such as walls.
The artifacts are essentially amplified quantization errors in the tone scale of the image. If, for instance, a scanner outputs 8-bit words representing an image, and a computer displays 16-bit words, the computer might multiply the 8-bit words by a scale factor of 28 in order to produce the 16-bit words for display. However, a difference of one between two 8-bit words now becomes an abrupt difference of 28. These abrupt differences can cause the quantization contour artifacts to become visible when the image is displayed.
There are various ways of reducing the visibility of the quantization contour artifacts. For example, Gaussian noise can be added to the underquantized image to break up the contour lines. However, the Gaussian noise can also reduce image contrast.
Another source of quantization contour artifacts is tone mapping, whereby the words of the underquantized image are multiplied by a tone-dependent gain. The gain is usually higher at lower tone levels in order to boost dark details to make them visible. Both signal and noise including so-called xe2x80x9cquantization noisexe2x80x9d are amplified by high gain. Without adequate input precision, high gain tone map regions have skipped output levels that yield abrupt difference quantization artifacts. These abrupt differences are especially visible in smooth shaded areas.
Thus an image which appears well quantized before tone mapping can show itself after mapping to have inadequate tonal precision.
Quantization contour artifacts are attenuated by augmenting precision using spatial information. According to one aspect of the present invention, an array of n-bit data words is generated, and the n-bit words are filtered to provide corresponding m-bit words. Filtering is performed by identifying upper and lower bounds of each m-bit word; and selecting values for the m-bit words between the upper and lower bounds. There is at least some spatial smoothness between the selected values. The lower bound of a given m-bit word has its n most significant bits equal to the corresponding n-bit word; and the upper bound of a given n-bit word is equal to a sum of a maximum uncertainty and the lower bound of the given m-bit word.
If the array of n-bit data words represents an image, the filtering can reduce the abruptness of changes in values of the m-bit words and, therefore, can attenuate quantization contour artifacts.
Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.